package com.hspedu.controller;

import com.hspedu.hspspringmvc.annotation.Controller;
import com.hspedu.hspspringmvc.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.Response;
import java.io.PrintWriter;

/**
 * packageName com.hspedu.controller
 *
 * @author 你的名字
 * @version JDK 8
 * @className MonsterController (此处以class为例)
 * @date 2025/2/11
 * @description TODO
 */
@Controller
public class MonsterController {
    @RequestMapping("/monster/list")
    public void listMonsters(HttpServletRequest request, HttpServletResponse response){
        response.setContentType("text/html;charset=utf-8");
        try {
            PrintWriter writer = response.getWriter();
            writer.println("<h1>妖怪列表</h1>");

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
